export default class SettleInfo{
    //总数量
     count:number=0;
    //总金额
     money:number=0;
    //配送费
     deliveryCost:number=0;
    //积分
    score:number=0;
    /**
     * Getter count
     * @return {number}
     */
	public getCount(): number {
		return this.count;
	}

    /**
     * Getter money
     * @return {number}
     */
	public getMoney(): number {
		return this.money;
	}

    /**
     * Setter count
     * @param {number} value
     */
	public incrCount(value: number) {
		this.count += value;
	}

    /**
     * Setter money
     * @param {number} value
     */
	public incrMoney(value: number) {
        this.money += value;
        this.money = Number(this.money.toFixed(2));
    }
    
    /**
     * Setter count
     * @param {number} value
     */
	public decrCount(value: number) {
		this.count -= value;
	}

    /**
     * Setter money
     * @param {number} value
     */
	public decrMoney(value: number) {
		this.money -= value;
    }
    
   

    /**
     * Setter count
     * @param {number} value
     */
	public  setCount(value: number):SettleInfo {
        this.count = value;
        return this ;
	}

    /**
     * Setter money
     * @param {number} value
     */
	public  setMoney(value: number):SettleInfo {
        this.money = value;
        return this ;
    }
    
    public clear(){
        this.count = 0 ;
        this.money = 0;
    }


}